// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** dingdingScanCodeLogin GET /user/users/auth */
export async function dingdingScanCodeLoginUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.dingdingScanCodeLoginUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserVO_>('/user/users/auth', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getUserInfo POST /user/users/getUserInfo */
export async function getUserInfoUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseUserVO_>('/user/users/getUserInfo', {
    method: 'POST',
    ...(options || {}),
  });
}

/** baseLogin POST /user/users/login */
export async function baseLoginUsingPost(
  body: API.AccountLoginRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserVO_>('/user/users/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** loginByEmail POST /user/users/loginByEmail */
export async function loginByEmailUsingPost(
  body: API.EmailLoginRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserVO_>('/user/users/loginByEmail', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** register POST /user/users/register */
export async function registerUsingPost(
  body: API.UserRegisterRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserVO_>('/user/users/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateUserInfo POST /user/users/updateUserInfo */
export async function updateUserInfoUsingPost(
  body: API.UserUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserVO_>('/user/users/updateUserInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
